<?php
class NewsController extends Zendvn_Controller_Action
{
	public function init()
	{
		$template_path=TEMPLATE_PATH."/public/system"; //Lua chon template hien thi cho Controller
		$this->loadTemplate($template_path);
		$this->view->headTitle()->append("-Tin Tức"); //Tieu de trang tren cung trinh duyet
	}
	
	public function indexAction()
	{
		
	  if (isset($namespace->foo)) { //Khoi lenh nay chua hieu de lam gi nhung khong co no van duoc
  
          echo "\$namespace->bar not set\n";
 
      }
		$news=new  Default_Model_News();
		$this->view->news=$news->getNews(); //Gui doi tuong news chua thong tin ve content trog table tintuc cho Index.phtml trong thuc muc views news
		
	}
	
	public function contentAction()
	{
		$content=new  Default_Model_News();
		$id = $this->_request->getParam('getNews');
		$this->view->content=$content->ContentID($id);
	
	}
}